package com.chixing.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chixing.mapper.ProductImgMapper;
import com.chixing.pojo.ProductImg;
import com.chixing.service.IProductImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IProductImgServiceImpl implements IProductImgService {
    @Autowired
    private ProductImgMapper productImgMapper;
    @Override
    public ProductImg selectProductImg(Integer productId) {
        QueryWrapper<ProductImg> objectQueryWrapper = new QueryWrapper<>();
        objectQueryWrapper.eq("product_id",productId);
        objectQueryWrapper.select("product_img_x1","product_img_x2","product_img_x2");
        ProductImg productImg = productImgMapper.selectOne(objectQueryWrapper);
        return productImg;
    }
}
